﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using System.ComponentModel;
using System.Reflection;

namespace MemoBoss
{
    public partial class About : UserControl
    {
        Action returnMethod;
        Action SetBackgroundPicture;
        public About(Action callback, Action SetBGPicture)
        {
            SetBackgroundPicture = SetBGPicture ;
            returnMethod = callback;
            InitializeComponent();
            
        }
       
        private void goBack() 
        {
            Hide.Begin();
            returnMethod();
        }
      

        private void btnBack_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            goBack();
        }
        private void Image_Email(object sender, System.Windows.Input.GestureEventArgs e)
        {
            Microsoft.Phone.Tasks.EmailComposeTask emailcomposer = new Microsoft.Phone.Tasks.EmailComposeTask();
            emailcomposer.To = "info@motif.lt";
            emailcomposer.Subject = "";
            emailcomposer.Body = "";
            emailcomposer.Show();

        }

      
        private void LayoutRoot_Loaded(object sender, RoutedEventArgs e)
        {
            Version v = new AssemblyName(Assembly.GetExecutingAssembly().FullName).Version;
            Version.Text = String.Format("Version {0}.{1}.{2}", v.Major, v.Minor, v.Build);
        }

        private void Show_Completed(object sender, EventArgs e)
        {
            SetBackgroundPicture();
        }
        public void ExitScreen() 
        {
            this.Hide.Begin();

        }
    }
}
